home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-12 | 1.8 KB | 50 lines | [TEXT/GEOL] |
- Item 3828388 8-Jan-90 23:08
-
- From: D3632 Cadence Design, Ken Friedenbach,PRT
-
- To: SCHMUCKER1 Schmucker, Kurt
- D2022 Strata, Gary Bringhurst,PRT
-
- cc: NASSI Nassi, Ike
- CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: Re- Re- What Gives Here?
-
- Item 8646736 18-Dec-89 05:25
-
- From: SCHMUCKER1 Schmucker, Kurt
-
- To: D2022 Strata, Gary Bringhurst,PRT
-
- cc: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
- NASSI Nassi, Ike
-
- Sub: Re: What gives here?
-
- Gary,
-
- This is what I believe is happening in your code (but I am still a C++
- novice):
-
- There are two "overs" in your code: overriding and overloading. Bjarne
- made the decision that overriding is stronger than overloading, hence
- overriding a foo method in a derived class hides ALL foos in any ancestor
- classes, regardless of their parameter lists. Apparently, (as your example
- shows), if you override all the foos, then it works out correctly.
-
- Don't you just love it when a language has fun, little quirky interactions
- like this between features?
-
- I also found this principle of "overriding is stronger than overloading"
- puzzling and in the current working draft definition of the next version of
- Object Pascal, we have these two concepts orthogonal, and thus, overriding
- foo(int) does not hide foo(real) or foo(string).
-
-
- Kurt Schmucker
- Apple Computer
-
-
-